<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" href="/static/favicon.ico">
    <link rel="Shortcut Icon" href="/static/favicon.ico"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="${ctx}/lib/html5shiv.js"></script>
    <script type="text/javascript" src="${ctx}/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="${ctx}/static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/h-ui.admin/css/style.css"/>
    <title>系統信息</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span>
    系统管理
    <span class="c-gray en">&gt;</span>
    系统信息
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form class="form form-horizontal" id="form-system-info-add">

        <div class="row cl">
            <input type="text" name="id" hidden value="1" class="input-text">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>网站标识
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="symbolName" placeholder="控制在10个字符内" value="${systemInfo.symbolName}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>后台网站名称
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="manageWebName" placeholder="控制在30个字符内" value="${systemInfo.manageWebName}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>后台网站地址
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="manageWebUrl" placeholder="控制在30个字符内" value="${systemInfo.manageWebUrl}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>后台网站描述
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="manageWebDes" placeholder="控制在200个字符内" value="${systemInfo.manageWebDes}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>后台公告信息
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <textarea id="countCode" name="manageAnnounce" class="textarea" placeholder="控制在800个字符内">${systemInfo.manageAnnounce}</textarea>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    后台网站版权
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="manageCopyright" placeholder="控制在200个字符内" value="${systemInfo.manageCopyright}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    后台网站欢迎语
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="manageCopyright" placeholder="控制在200个字符内" value="${systemInfo.manageWelcomeSpeech}" class="input-text">
                </div>
            </div>


            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>前台网站名称
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="portalWebName" placeholder="控制在30个字符内" value="${systemInfo.portalWebName}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>前台网站地址
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="portalWebUrl" placeholder="控制在30个字符内" value="${systemInfo.portalWebUrl}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>前台网站描述
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="portalWebDes" placeholder="控制在200个字符内" value="${systemInfo.portalWebDes}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>前台公告信息
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <textarea id="countCode" name="portalAnnounce" class="textarea" placeholder="控制在800个字符内">${systemInfo.portalAnnounce}</textarea>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    前台网站版权
                </label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" name="portalCopyright" placeholder="控制在200个字符内" value="${systemInfo.portalCopyright}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    <button id="saveButton" class="btn btn-primary radius" type="submit"><i
                            class="Hui-iconfont">&#xe632;</i> 保存
                    </button>
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">
                        &nbsp;&nbsp;取消&nbsp;&nbsp;
                    </button>
                </div>
            </div>
        </div>
    </form>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="${ctx}/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="${ctx}/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="${ctx}/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="${ctx}/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="${ctx}/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="${ctx}/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">

    $(function () {
        $("#form-system-info-add").validate({
            rules: {
                symbolName: {
                    maxlength: 10,
                    required: true
                }, manageWebName: {
                    maxlength: 30,
                    required: true,
                }, manageWebUrl: {
                    maxlength: 30,
                    required: true,
                }, manageWebDes: {
                    maxlength: 200,
                    required: true,
                }, manageAnnounce: {
                    maxlength: 200,
                    required: true,
                }, portalWebName: {
                    maxlength: 30,
                    required: true,
                }, portalWebUrl: {
                    maxlength: 30,
                    required: true,
                }, portalWebDes: {
                    maxlength: 200,
                    required: true,
                }, portalAnnounce: {
                    maxlength: 200,
                    required: true,
                },
            },
            onkeyup: false,
            focusCleanup: false,
            success: "valid",
            submitHandler: function (form) {
                var index = layer.load(3);
                $(form).ajaxSubmit({
                    url: "${ctx}/system/info/update",
                    type: "POST",
                    success: function (data) {
                        layer.close(index);
                        if (data.code == 200) {
                            msgSuccess("编辑成功!");
                        } else {
                            layer.alert(data.msg, {title: '错误信息', icon: 2});
                        }
                    },
                    error: function (XMLHttpRequest) {
                        layer.close(index);
                        layer.alert('数据处理失败! 错误码:' + XMLHttpRequest.status, {
                            title: '错误信息',
                            icon: 2
                        });
                    }
                });
            }
        });
    });

    function msgSuccess(content) {
        layer.msg(content, {icon: 1, time: 3000});
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>

